package com.life.common;

import lombok.Data;

@Data
public class ResponseDTO {
    Integer status;
    String msg;
    Object data;


    private ResponseDTO(Integer status,String msg,Object data){
        this.status=status;
        this.msg=msg;
        this.data=data;
    }

    private ResponseDTO(Integer status,String msg){
        this.status=status;
        this.msg=msg;
    }

    private ResponseDTO(Integer status){
        this.status=status;
    }

    public static ResponseDTO buildSuccessResponse(){
        return new ResponseDTO(1);
    }

    public static ResponseDTO buildSuccessResponse(String msg,Object data){
         return new ResponseDTO(1,msg,data);
    }
    public static ResponseDTO buildSuccessError(String msg){
        return new ResponseDTO(0,msg);
    }

}
